using RockHopper.Common.Model;
using RockHopper.TrainingCalculator.WinRT.Utils;

namespace RockHopper.TrainingCalculator.WinRT.ViewModel
{
    public class RepetitionTileViewModel : TileViewModel
    {
        public override string Label
        {
            get { return "Repetitions"; }
        }

        public override void UpdateLiveTile(CalculationContext context, PaceUnitType units)
        {
            LiveTileInfo = context.Repetition200.FormatPace()
                + "/" + context.Repetition400.FormatPace();

            if (context.Repetition800 > 0)
                LiveTileInfo += "/" + context.Repetition800.FormatPace();
        }
    }
}